﻿@using Ducu.UI.Responsible.WebHelper
@using Ducu.SRV.ViewModel.Task.Shared
@using Global.Core.ExtensionMethod
@using Ducu.GLB.Global
@model _DayModel
@if (Model.Status != Status.Empty)
{
    if (Model.Status == Status.WaitComplete)
    {
        @Html.RadioButton("TaskItem.CompleteDate", Model.CompleteDate, DateTime.Now.Date == Model.CompleteDate.Date, new { title = Model.CompleteDate.ToChineseDate() })
    }
    else
    {
        string className = DayIconHelper.GetClassName(Model.Status);
        if (Model.CompleteDate > DateTime.Now)
        {
            className += " lightgray"; /* notice the space */
        }
        <span class="@className" aria-hidden="true" title="@Model.CompleteDate.ToChineseDate()" data-month="@Model.CompleteDate.Month" data-taskday-id="@Model.Id"></span>
    }
}
else
{
    <span class="glyphicon" aria-hidden="true" title="@Model.CompleteDate.ToChineseDate()"></span>
}
